f = open("poker.txt","r")
hands = []
for line in f:
    l = line.strip().split(" ")
    z = []
    for x in l:
        z.append((x[:1],x[1:]))
    hands.append([z[:5],z[5:]])
f.close()
#poker hands read into hands list

#print(hands[0][0][0][0])

def findwinner(hand):
    for player in hand:
        if '9' and '10' and 'J' and 'Q' and 'K' in [x[0] for x in player] and [x[1] for x in player].count(player[0][1]) == 5:
            print("FLUSH")
        if 

for hand in hands:
    findwinner(hand)